<?php
/* @var $this HoadonController */
/* @var $model Hoadon */

$this->breadcrumbs=array(
	'Hoadons'=>array('index'),
	'Manage',
);

//$this->menu=array(
//	array('label'=>'List Hoadon', 'url'=>array('index')),
//	array('label'=>'Create Hoadon', 'url'=>array('create')),
//);

Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$.fn.yiiGridView.update('hoadon-grid', {
		data: $(this).serialize()
	});
	return false;
});
");
?>

<h1><?php echo Yii::t('translation', 'BillManage') ?></h1>

<p>
    <?php echo Yii::t('translation', 'TipsForAdvanceSearch') ?>
</p>

<?php echo CHtml::link(Yii::t('translation', 'AdvanceSearch'),'#',array('class'=>'search-button')); ?>

<div class="search-form" style="display:none">
<?php $this->renderPartial('_search',array(
	'model'=>$model,
)); ?>
</div><!-- search-form -->

<?php $this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'hoadon-grid',
	'dataProvider'=>$model->search(),
	'filter'=>$model,
	'columns'=>array(
		'IDHD',
		'MAHD',
		'NGAYLAP',
		'NGAYTT',
		'IDKH',
		array(
			'class'=>'CButtonColumn',
		),
	),
)); ?>
